package com.digua.base.socket.request

import org.java_websocket.client.WebSocketClient

class StringRequest : Request<String> {
    private var data: String? = null

    override fun setRequestData(data: String) {
        this.data = data
    }

    override fun getRequestData(): String? = data

    override fun send(client: WebSocketClient?) {
        client?.send(data)
    }

    override fun release() {
        RequestFactory.releaseStringRequest(this)
    }

    override fun toString() = "[@ByteBufferRequest${hashCode()},String :${data ?: "null"}]"
}